<template>
  <div class="home">
    <user :word="word" @add="add"></user>
    <foot :arr="arr"></foot>
  </div>
</template>

<script lang="ts">
import user from './user.vue'
import foot from './foot.vue'
import { reactive, ref } from 'vue'
interface obType {
  flag: boolean,
  txt: string|undefined,
  isEdit: boolean
}
export default {
  components: { user, foot },
  setup() {
    let word = ref('')
    let arr = reactive<obType[]>([])
    let add = (obj:obType) => {
      arr.push(obj)
    }


    return {
      word,
      arr,
      add
    }
  }
}
</script>
